Function MatrixSum(arr1, arr2)
    Dim arr
    arr = Evaluate("{" & Join(arr1, ",") & "}+{" & Join(arr2, ",") & "}")
    MatrixSum = arr
End Function


Function MatrixSubtraction(arr1, arr2)
    Dim arr
    arr = Evaluate("{" & Join(arr1, ",") & "} - 1 * {" & Join(arr2, ",") & "}")
    MatrixSubtraction = arr
End Function

Function MatrixMultiplication(arr1, arr2)
    Dim arr
    arr = Evaluate("{" & Join(arr1, ",") & "}*{" & Join(arr2, ",") & "}")
    MatrixMultiplication = arr
End Function

Function MatrixLeftDivision(arr1, arr2)
    Dim arr
    arr = Evaluate("{" & Join(arr1, ",") & "}^-1 * {" & Join(arr2, ",") & "}")
    MatrixLeftDivision = arr
End Function

Function MatrixRightDivision(arr1, arr2)
    Dim arr
    arr = Evaluate("{" & Join(arr1, ",") & "}  * {" & Join(arr2, ",") & "}^-1")
    MatrixRightDivision = arr
End Function

Function TDMatrixSum(arr1, arr2)
    Dim arr
    arr = Evaluate("{" & Join(arr1, ",") & "}+{" & Join(arr2, ";") & "}")
    TDMatrixSum = arr
End Function

Function TDMatrixSubtraction(arr1, arr2)
    Dim arr
    arr = Evaluate("{" & Join(arr1, ",") & "} - 1 * {" & Join(arr2, ";") & "}")
    TDMatrixSubtraction = arr
End Function

Function TDMatrixMultiplication(arr1, arr2)
    Dim arr
    arr = Evaluate("{" & Join(arr1, ",") & "}*{" & Join(arr2, ";") & "}")
    TDMatrixMultiplication = arr
End Function



Function TDMatrixLeftDivision(arr1, arr2)
    Dim arr
    arr = Evaluate("{" & Join(arr1, ",") & "}^-1 * {" & Join(arr2, ";") & "}")
    TDMatrixLeftDivision = arr
End Function


Function TDMatrixRightDivision(arr1, arr2)
    Dim arr
    arr = Evaluate("{" & Join(arr1, ",") & "}  * {" & Join(arr2, ";") & "}^-1")
    TDMatrixRightDivision = arr
End Function

